<template>
	<!-- 弹出提示 -->
	<view>
		<!-- :closeable="true" -->
		<u-popup :show="show" mode="center" :round="10" @close="close" :closeOnClickOverlay="true">
			<view class="wrap">
				<view class="" v-if="isSus">
					<image class="success-icon icon-success"></image>
					<text class="f32 bold success-tips">{{title}}</text>
					<text class="f28 success-text">{{des}}</text>
				</view>
				<view v-else class="">
					<image class="success-icon icon-warn"></image>
					<text class="f32 bold success-tips">{{title}}</text>
					<text class="f28 success-text">{{des}}</text>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		name: "rf-toast",
		props: {
			show: {
				type: Boolean,
				required: true
			},
			isSus: {
				type: Boolean,
				required: true,
				default: true,
			},
			title: {
				type: String,
				required: true,
				default: "提示",
			},
			des: {
				type: String,
				required: true
			}
		},
		watch: {
			show(e) {
				console.log(e);
			}
		},
		data() {
			return {

			};
		},

		methods: {
			close() {
				this.$emit('click')
			}
		},

	}
</script>


<style lang="scss">
	.wrap {
		width: 480rpx;
		height: 320rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-around;
		font-size: 28rpx;
		z-index: 999;
		padding: 24rpx;
		// display: flex;
		// justify-content: center;
		// align-items: center;

		// width: 480rpx;
		// height: 320rpx;
		// margin: 0;
		// border-radius: 20rpx;
		// color: #3d3d3d;

		.success-icon {
			display: block;
			width: 128rpx;
			height: 128rpx;
			margin: 0 auto 0;
		}

		.success-tips {
			display: block;
			text-align: center;
			margin-top: 10rpx;
		}

		.success-text {
			display: block;
			text-align: center;
			color: #77798D;
			margin-top: 10rpx;
			padding: 0rpx 30rpx;
		}

	}
</style>